﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AMS.Business;
using System.Net;

namespace AMS.Test
{
    public class Program
    {
        static void Main(string[] args)
        {
            //AccessWeb accessWeb = new AccessWeb();
            //Console.WriteLine(accessWeb.AccessWebURL("ITDC", "ITDC@Admin"));
            //MailService mailService = new MailService();
            //if (!string.IsNullOrEmpty(accessWeb.AccessWebURL("ITDC", "ITDC@Admin")))
            //    mailService.CreateMail("001", "runpu.zhao@hisoft.com", "", null, null);
            //HttpsRequest https = new HttpsRequest();
            //https.AccessHttps();


            //Encoding encoding = Encoding.GetEncoding("gb2312");
            //string loginUrl = "https://email.hisoft.com/owa/auth/logon.aspx?replaceCurrent=1&url=https%3a%2f%2femail.hisoft.com%2fowa%2f";
            //IDictionary<string, string> parameters = new Dictionary<string, string>();
            //parameters.Add("destination", "	https://email.hisoft.com/owa/");
            //parameters.Add("flags", "0");
            //parameters.Add("forcedownlevel", "0");
            //parameters.Add("isUtf8", "1");
            //parameters.Add("password", "guxingbiao1");
            //parameters.Add("trusted", "0");
            //parameters.Add("username", "wuxi\\r11132");

            //HttpWebResponse response = HttpWebResponseUtility.CreatePostHttpResponse(loginUrl, parameters, null, null, encoding, null);
            //string cookieString = response.Headers["Set-Cookie"];

            //string loginUrl = "https://passport.baidu.com/?login";
            //string userName = "guxingbiao2011";
            //string password = "guxingbiao0507";
            //string tagUrl = "http://cang.baidu.com/" + userName + "/tags";
            //Encoding encoding = Encoding.GetEncoding("gb2312");

            //IDictionary<string, string> parameters = new Dictionary<string, string>();
            //parameters.Add("tpl", "fa");
            //parameters.Add("tpl_reg", "fa");
            //parameters.Add("u", tagUrl);
            //parameters.Add("psp_tt", "0");
            //parameters.Add("username", userName);
            //parameters.Add("password", password);
            //parameters.Add("mem_pass", "1");
            //HttpWebResponse response = HttpWebResponseUtility.CreatePostHttpResponse(loginUrl, parameters, null, null, encoding, null);
            //string cookieString = response.Headers["Set-Cookie"]; 
            //Console.ReadLine();
        }
    }
}
